package org.ucas.faker.web.utils.fishbone;

import java.util.ArrayList;
import java.util.List;

public class Tag {

    private String text;
    private double x;
    private double y;
    private double size;
    private String direction;


    private List<String> patentList = new ArrayList<String>();

    public static String DIRECTION_LEFT = "L";
    public static String DIRECTION_RIGHT = "R";
    public static String DIRECTION_UP = "U";
    public static String DIRECTION_DOWN = "D";

    public Tag(){
        this.size = 14.0;
        this.text = "";
        this.x = 0.0;
        this.y = 0.0;
        this.direction = Tag.DIRECTION_LEFT;
    }

    public String getText() {
        return text;
    }

    public Tag setText(String text) {
        this.text = text;
        return this;
    }

    public String getDirection() {
        return direction;
    }

    public Tag setDirection(String direction) {
        this.direction = direction;
        return this;
    }

    public List<String> getPatentList() {
        return patentList;
    }

    public Tag setPatentList(List<String> patentList) {
        this.patentList = patentList;
        return this;
    }


    public double getX() {
        return x;
    }

    public Tag setX(double x) {
        this.x = x;
        return this;
    }

    public double getY() {
        return y;
    }

    public Tag setY(double y) {
        this.y = y;
        return this;
    }

    public double getSize() {
        return size;
    }

    public Tag setSize(double size) {
        this.size = size;
        return this;
    }

    public Tag setCoordinate(double[] coo){
        this.x = coo[0];
        this.y = coo[1];
        return this;
    }

    public void print(){
        System.out.println("tag: "+text+" ("+x+", "+y+")  size="+size);
    }

}
